/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cflp;

import java.util.*;

/**
 *
 * @author Gustavo Bula
 */
public class SolucionComparator implements Comparator {

    public int compare(Object ind1, Object ind2) {



        int dist1 = ((Solucion) ind1).getFuncion();
        int dist2 = ((Solucion) ind2).getFuncion();

        if (dist1 > dist2) {
            return 1;
        } else if (dist1 < dist2) {
            return -1;
        } else {
            return 0;
        }
    }
}
